<html>
    <head>
        
        
    </head>
    <body>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <?php
        
         require_once("biblioteca/fpdf16/fpdf.php");
         require "action/SearchPark.action.php";
         
         
         $pdf= new FPDF('P');
 
$pdf-> Open();
 
// Definindo Fonte
$pdf->SetFont('arial','',10);
 
//posicao vertical no caso -1 e o limite da margem
$pdf->SetY("-2");
 
        //::::::::::::::::::Cabecalho::::::::::::::::::::
if($park ){
                       $pdf->Cell(0,5,'Relatorios de Entrada e Saida',0,0,'L');
        
       
                       
                       
                       
                       
                       
        $pdf->Cell(0,5,'',0,1,'R');
        $pdf->Cell(0,0,'',1,1,'L');
 
        $pdf->Ln(8);    
 
        $pdf-> SetFont('arial','B',10);
        $pdf->SetFillColor(122,122,122);
 
        $pdf-> SetFont('Times','B',9);
       //$pdf-> Cell(30,5,' ',0,0);
        $pdf-> SetFont('Times','',9);
        //$pdf-> Cell(75,5,'',0,1);
        $pdf-> Ln(3);
 
        $pdf-> SetFont('Times','B',9);
        //$pdf-> Cell(30,5,' ',0,1);
        $pdf-> SetFont('Times','',9); 
        $pdf->MultiCell(300,20," Cliente                                     Modelo                   Placa                   Entrada                         Saida   Tarifa    Total    Status  ",0,1);
			foreach($park as $c) {
                            
                            
                        $clients=$c->getClients();
			$model= $c->getModel(); 
                        $plaque= $c->getPlaque(); 
                        $datein= $c->getDatein(); 
                        $dateout=$c->getDateout(); 
                        $fare= number_format($c->getFare(), 2, ',', '.'); 
                        $total= number_format($c->getTotal(), 2, ',', '.'); 
                        $status= $c->getStatus(); 
                            
                   
        $pdf->MultiCell(250,8,"$clients              $model      $plaque            $datein      $dateout    $fare    $total                 $status
",0,1);
       
                        }}  

 
        $pdf-> Output("park.pdf");
         

         
       header("Location: tablePark.php");
       
?>
       
    </body>
</html>

